<!DOCTYPE html>
<html debug="true">
	<head>
		<title>Creating Repetition Templates Dynamically</title>
		<meta name="description" content="" />
		<meta name="keywords" content="" />
		<script type="text/javascript" src="../../webforms2_src.js"></script>
		<script type="text/javascript" src="firebug/firebug.js"></script>
		<script type="text/javascript">
		//$wf2.getElementsByTagNamesAndAttribute.apply(document.documentElement, [['option','input'], 'value']);
		onload = function(){
			//console.info(document.getElementById('i').repetitionBlocks);
		}
		</script>
	</head>
<body>
<div id="testcaseDesc">
	
	
	<blockquote>
	
	</blockquote>
</div>

<!-- BEGIN TEST CASE -->
<!--
	<h1>DOM Attributes in Repetition Model</h1>
	<form onsubmit="return true">
		<table>
			<tr id="rm" repeat="template">
				<td><input type="text" value="[rm]"></td>
				<td><input type="remove"></td>
				<td><input type="move-down"><input type="move-up"></td>
			</tr>
		</table>
		<input type="add" template="rm">
	</form>
	
	
	<h1>DOM Attributes in Form Validation</h1>
	<form onsubmit="return true">
		
	</form>
-->

<!--
<p><em>See test case for Opera.</em></p>
<p><em>Remember: only construct repetition elements if inserted into the <code>document</code>. Otherwise just set the content attribute (i.e. "repeat"); we can test this with <code>el.ownerDocument != document</code>?</em></p>
-->
<p>The following statement, "We are quintuplits", should be repeated five times:</p>
<div id='repeatTest1'>
<script type="text/javascript">

var div = document.createElement('div');
div.repetitionType = RepetitionElement.REPETITION_TEMPLATE; //this envokes the setter, which sets the 'repeat' attribute
div.repeatStart = 5;
div.innerHTML = "We are quintuplits.";
//div.setAttribute('repeat', 'template');
//  note: this will  not fire a MutationEvent since it is not in the document yet;
//        we must traverse all child elements looking for elements with the repeat attribute when a DOM node is inserted
document.getElementById('repeatTest1').appendChild(div);

</script>
</div>

<!-- END TEST CASE -->  
  
 </body>
</html>